import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import VueParticles from 'vue-particles'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import vueSeamlessScroll from 'vue-seamless-scroll/src'
import 'element-plus/dist/index.css'
import './assets/app.css'
import './assets/font/iconfont.css'
import './index.css'
import VueAwesomeSwiper from 'vue-awesome-swiper/src';
import WebSocket from './js/WebSocket';
import './swiper.css';

// WebSocket.Instance.connect();

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// app.config.globalProperties.$api = api;
app.config.globalProperties.$store = store;
app.config.globalProperties.$socket = WebSocket.Instance
app.use(router).use(ElementPlus, {
  locale: zhCn,
}).use(store).use(VueParticles).use(vueSeamlessScroll).use(VueAwesomeSwiper);
app.mount('#app')